//
// Created by Administrator on 2022/12/17.
//

#ifndef AVPLAYER_JAVACALLHELPER_H
#define AVPLAYER_JAVACALLHELPER_H

#include <jni.h>

#define THREAD_MAIN 1
#define THREAD_CHILD 2

class JavaCallHelper {

private:
    JavaVM *javaVm;
    JNIEnv *env;
    jmethodID  callMethodId;
    jobject jobj;

public:
    JavaCallHelper(JavaVM *_javaVM, JNIEnv *_env, jobject &_jobj);
    ~JavaCallHelper();
    void callData(char * data, int length, int thread  = THREAD_MAIN);
};


#endif //AVPLAYER_JAVACALLHELPER_H
